<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box1,
      .box2 {
        width: 600px;
        height: 200px;
        background-color: lightcoral;
      }
      .box1 {
        margin-right: -20px;
      }
      .box1 .box1_child {
        height: 200px;
        margin-right: 20px;
        background-color: blue;
      }
      .box2 .box2_child {
        height: 200px;
        margin-top: 10px;
        margin-right: -20px;
        background-color: blue;
      }
    </style>
  </head>
  <body>
    <div class="box1">
      <div class="box1_child">margin-right 为 20px</div>
    </div>
    <div class="box2">
      <div class="box2_child">margin-right 为 -20px</div>
    </div>
  </body>
</html>
